Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub actions to build and publish Rust docs #866

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

tiziano88
Copy link
Collaborator

@tiziano88 tiziano88 commented Apr 17, 2020

This is not feasible on GCP because we don't have a way of
authenticating only post-merge workflows.

GitHub actions instead get provisioned with a read-only token for pull
requests, and with a read + write token for merge.

@tiziano88 tiziano88 force-pushed the tzn_github_action branch 28 times, most recently from 9f82564 to b0edb4d Compare April 18, 2020 00:53
@tiziano88 tiziano88 changed the title GH actions Use GitHub actions to build and publish Rust docs Apr 18, 2020
@tiziano88 tiziano88 requested a review from conradgrobler April 18, 2020 00:53
@tiziano88 tiziano88 force-pushed the tzn_github_action branch 5 times, most recently from 7122359 to 3c03851 Compare April 18, 2020 12:56
@tiziano88 tiziano88 force-pushed the tzn_github_action branch 3 times, most recently from f83c122 to f5e2085 Compare April 20, 2020 09:35
This is not feasible on GCP because we don't have a way of
authenticating only post-merge workflows.

GitHub actions instead get provisioned with a read-only token for pull
requests, and with a read + write token for merge.
Copy link
Collaborator

@conradgrobler conradgrobler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiziano88 tiziano88 marked this pull request as ready for review April 20, 2020 10:13
@tiziano88 tiziano88 merged commit bc0bf99 into project-oak:master Apr 20, 2020
@tiziano88 tiziano88 deleted the tzn_github_action branch April 20, 2020 10:54
@daviddrysdale
Copy link
Contributor

This seems to be generating gh-pages commits for things that don't affect the generated docs.

~/src/oak{master}:git log -n3 --oneline upstream/gh-pages
4d09e945bc42 (upstream/gh-pages) Update gh-pages from bc98624bdcf6629c4f3ef4aa139bd4a0892f3744
cf1d4380558d Update gh-pages from 6ceb81cabc00decf21e2875bbeac9d7fabd8b1fe
4e733345b21e Update gh-pages from 9ccaae8f7b94006b8f23f5c9d9ca8f88b3fe66f5
~/src/oak{master}:git diff --name-only 9ccaae8f7b94006b8f23f5c9d9ca8f88b3fe66f5..6ceb81cabc00decf21e2875bbeac9d7fabd8b1fe
Dockerfile
docs/INSTALL-OSX.md
scripts/build_server
scripts/run_server

@tiziano88
Copy link
Collaborator Author

Yes it will generate them for each commit, I imagine we could write some regexp to only trigger the workflow if any Rust file (or proto file, or BUILD file, etc...) changed, but I don't think it's worth the effort, the point of this is that it is now automated and we don't need to deal with it.

@tiziano88
Copy link
Collaborator Author

Ah but I see your point, now we have random commits like this: cf1d438 which AFAICT are just caused by some non-determinism in the generation.

@daviddrysdale
Copy link
Contributor

Yeah, I didn't think cargo-doc was deterministic.

Having a commit on gh-pages for every single commit on master, whether it affects the docs or not, is pretty ugly. However, I guess in practice it's unlikely to cause problems (we don't commit often enough that the gratuitous cache invalidation is a problem, and anyone trying to (say) track down a historical API changes is more likely to use the source in master than the docs in gh-pages).

we could write some regexp to only trigger the workflow

Something along these lines was deleted in d7d8dbd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants